package com.duyi.video;

import com.duyi.video.service.UserService;
import org.apache.ibatis.session.defaults.DefaultSqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringTest {

    public static void main(String[] args) {


//        DefaultListableBeanFactory
//        List<String> beanNames = new ArrayList<>(this.beanDefinitionNames);
//        869行，查看spring容器初始化bean实例
        ClassPathXmlApplicationContext cxt = new ClassPathXmlApplicationContext("classpath:spring/*.xml");

        DefaultSqlSessionFactory sqlSessionFactory = (DefaultSqlSessionFactory) cxt.getBean("sqlSessionFactory");

        System.out.println(sqlSessionFactory);


    }
}
